//Vasilakis Antonios 59475

#include <stdio.h>

int main() {
    int children;

    while (1) {
        printf("Δώστε τον αριθμό των παιδιών: ");
        if (scanf("%d", &children) != 1) {
            while (getchar() != '\n'); 
            continue;
        }


    while (children < 0 || children > 12) {
        printf("Δώσε τον αριθμό των παιδιών: ");
        scanf("%d", &children);
    }

    int allow = 0;
    
    if (children >= 1) allow += 18;
    if (children >= 2) allow += 18;
    if (children >= 3) allow += 35;
    if (children >= 4) allow += 47;
    if (children > 4) {
        allow += (children - 4) * 73;
    }

    printf("Το συνολικό επίδομα είναι %d €\n", allow);
    
    return 0;
}   }